<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    String path = request.getContextPath();
%>
<h5>评论:</h5>
<br/>
<div class="comment-form">
    <textarea  id="remark" name="remark"  style="width:85%; height: 40px;float: left;"  placeholder="写下你的评论..."></textarea>
    <input type="hidden" name="userinfoId" value="${sessionScope.userinfo.id}">
    <input type="hidden" name="taskId" value="${task.id}">
    <input type="button" class="taskComments" style="border: none;background: #666;color: #FFF;width: 13%;height: 40px; " value="发布" />
</div>

<c:forEach items="${requestScope.pageInfo.list}" var="comment">
    <ul class="wm-comment-list" >
        <li>
            <div class="single-work-history">
                <div  class="single-candidate-list" style="border: 1px solid #e8ecec;border-radius:5px; width:98%;margin-top: 20px;">
                    <div class="main-comment" style="padding: 0px 10px 0px 40px;font-weight: normal !important;margin-top: 10px;margin-left: -20px;">
                        <div class="candidate-image" style="width: 30px;top: 0;">
                            <img style="max-width: 100%;height: auto;border-radius: 50%;display: block;width: 80px;max-height: 30px;max-width: 30px;" alt="author" src="<%=path%>/web/index/images/default.jpg">
                        </div>
                        <div class="candidate-text" style="padding: 0px 10px 0px 40px;font-weight: normal !important;">
                            <div class="candidate-info" style="margin-top: -20px;">
                                <div class="candidate-title">
                                    <a style="margin-top: 0px;" href="#">${comment.userinfo.username}</a>
                                    <span><i class="fa fa-calendar-check-o"></i><img src="<%=path%>/web/static/img/date.jpg" style="margin-top: -3px;"/><fmt:formatDate value="${comment.inputTime}" pattern="yyyy-MM-dd"/></span>
                                </div>
                            </div>
                            <div class="candidate-text-inner">
                                <p style="margin-top: 10px; margin-bottom: 10px;">
                                        ${comment.remark}
                                </p>
                            </div>


                            <div>
                                <a href="#"   class="reply" data-id="${comment.id}"style="color: #1d74b6;font-weight: 600;" >回复</a>
                                    <span>
                                        <a  href="#" class="showreply" data-id="${comment.id}" data-info="0条回复"><span>${fn:length(comment.comments)}条回复 <img style="margin-top: -2px;" src="<%=path%>/web/static/img/bottom2.jpg"></span><i class="fa fa-chevron-down"></i></a>

                                    </span>

                                <div style="margin-top: 10px; ">
                                    <p>
                                        <span class="replyShow show${comment.id}">
                                            <textarea style=" float: left;width:85%; height: 40px;"  placeholder="写下你的回复..."></textarea>
                                            <input type="hidden" name="userinfoId" value="${sessionScope.userinfo.id}">
                                            <input type="hidden" name="taskId" value="${task.id}">
                                            <input type="button" class="taskComments" style=" border: none;background: #666;color: #FFF;width: 14%;height:40px;margin-bottom: 10px;" value="发布" />
                                        </span>
                                    </p>
                                </div>
                                <!-- 二级评论显示框-->

                                <span class="multistage mul${comment.id}">
                                <c:forEach items="${comment.comments}" var="com">
                                    <div class="candidate-image" style="width: 30px;top: 0;">
                                        <img style="max-width: 100%;height: auto;border-radius: 50%;display: block;width: 80px;max-height: 30px;max-width: 30px;" alt="author" src="<%=path%>/web/index/images/default.jpg">
                                    </div>

                                    <div class="candidate-info" style="margin-top: 0px;">
                                        <div class="candidate-title">
                                            <a style="margin-top: 0px;" href="javascript:void(0)">${com.userinfo.username}</a>
                                            <span><i class="fa fa-calendar-check-o"></i><img src="<%=path%>/web/static/img/date.jpg" style="margin-top: -3px;"/><fmt:formatDate value="${com.inputTime}" pattern="yyyy-MM-dd"/></span>
                                        </div>
                                    </div>
                                    <div class="candidate-text-inner">
                                        <p style="margin-top: 10px; margin-bottom: 10px;">
                                                ${com.remark}
                                        </p>
                                    </div>
                                </c:forEach>
                                </span>





                            </div>
                            <div class="replyform"></div>
                            <div class="replynew">
                                <ul></ul>
                            </div>
                            <div class="reply">
                                <ul>
                                </ul>
                                <div class="wm-more btn" style="display: none;">点击查看更多留言</div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </li>
    </ul>
</c:forEach>
<div class="meneame" style="height:60px;">
    <c:forEach begin="1" end="${requestScope.pageInfo.pages}" var="i">
        <c:if test="${requestScope.pageInfo.pageNum eq i}" var="isCur">
            <a class="current" data-id="${i}">${i}</a>
        </c:if>
        <c:if test="${not isCur}">
            <a href="#" data-id="${i}">${i}</a>
        </c:if>
    </c:forEach>
    <%--       <a href="#?page=2"> >                      </a>                           --%>
</div>

